package com.baidu.mpks.permission.dao;

import com.baidu.mpks.permission.domain.Permission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PermissionDao {

    List<Permission> findAll(@Param("start") int start, @Param("pageSize") Integer pageSize);

    Long findAllTotal();

    List<Permission> getPermissionListByType(@Param("typeList") List<Integer> typeList);

    List<Permission> findByRoleIds(List<Integer> roleIds);

    Permission findByCode(@Param("code") String code);

    List<Permission> findAllAudit(@Param("start") int start, @Param("pageSize") Integer pageSize);

    Long findAllAuditTotal();

    List<Permission> findAllExclude(@Param("start") int start, @Param("pageSize") Integer pageSize, @Param("excludeIds") List<Integer> excludeIds);

    Long findAllTotalExclude(@Param("excludeIds") List<Integer> excludeIds);

    List<Permission> findAllAuditExclude(@Param("start") int start, @Param("pageSize") Integer pageSize, @Param("excludeIds") List<Integer> excludeIds);

    Long findAllAuditTotalExclude(@Param("excludeIds") List<Integer> excludeIds);
}
